//
//  LJM_YINDAOYE_ViewController.m
//  wind
//
//  Created by 李金明 on 16/1/21.
//  Copyright © 2016年 李金明. All rights reserved.
//

#import "LJM_YINDAOYE_ViewController.h"
#import "SYP_ManagerViewController.h"
#define WIDTH [UIScreen mainScreen].bounds.size.width
#define HEIGHT [UIScreen mainScreen].bounds.size.height
@interface LJM_YINDAOYE_ViewController ()

@end

@implementation LJM_YINDAOYE_ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    [self addyindao];   //加载新用户指导页面
}
#pragma 添加引导页
- (void)addyindao
{
    UIScrollView *scrollV = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)];
    [scrollV setContentSize:CGSizeMake([UIScreen mainScreen].bounds.size.width * 2, 0)];
    
    scrollV.pagingEnabled = YES;
    
    UIImageView *imageV1 = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
    imageV1.image = [UIImage imageNamed:@"yindaoye1"];
    [scrollV addSubview:imageV1];
    [imageV1 release];
    CGFloat w = WIDTH;
    CGFloat h = HEIGHT;
    UIImageView *imageV2 = [[UIImageView alloc] initWithFrame:CGRectMake(WIDTH, 0, WIDTH, HEIGHT)];
    imageV2.image = [UIImage imageNamed:@"yindaoye2"];
    [scrollV addSubview:imageV2];
    [imageV2 release];
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.backgroundColor = [UIColor clearColor];
    
    button.frame = CGRectMake(w + 20, h * (4.0 / 5.0), w - 40, 40);
    [button setTitle:@"进入主界面" forState:UIControlStateNormal];
    [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [button addTarget:self action:@selector(intnavigation) forControlEvents:UIControlEventTouchUpInside];
    [scrollV addSubview:button];
    
    [self.view addSubview:scrollV];
    [scrollV release];
    
    
}
#pragma button的点击方法进入主页面
- (void)intnavigation
{
    SYP_ManagerViewController *rootVC = [[SYP_ManagerViewController alloc] init];
    
    [self presentViewController:rootVC animated:YES completion:^{
        
    }]; //点击button跳转到根视图
    [rootVC release];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
